import Vue from "vue";
import VueRouter from "vue-router";
// import Home from "../views/Home.vue";
// import Login from "../views/Login.vue";
// import Register from "../views/Register.vue";
// import Personal from "../views/personal/index.vue";
// import Setting from "../views/personal/setting.vue";
// import Eait from "../views/personal/eait.vue";
// import WatchFul from "../views/personal/watchful.vue";
// import Collect from "../views/personal/collect.vue";
// import Follow from "../views/personal/follow.vue";
// import At from "../views/personal/attention.vue";
// import Renaissance from "../components/renaissance .vue";
// import Search from "../components/search.vue";
// import Management from "../views/personal/management .vue";
// const Vue = () => import("vue");
// const VueRouter = () => import("vue-router");
// const Home = () => import("../views/Home.vue");
// const Login = () => import("../views/Login.vue");
// const Register = () => import("../views/Register.vue");
// const Personal = () => import("../views/personal/index.vue");
// const Setting = () => import("../views/personal/setting.vue");
// const Eait = () => import("../views/personal/eait.vue");
// const WatchFul = () => import("../views/personal/watchful.vue");
// const Collect = () => import("../views/personal/collect.vue");
// const Follow = () => import("../views/personal/follow.vue");
// const At = () => import("../views/personal/attention.vue");
// const Renaissance = () => import("../components/renaissance .vue");
// const Search = () => import("../components/search.vue");
// const Management = () => import("../views/personal/management .vue");

Vue.use(VueRouter);

const routes = [
  // {
  //   path: "",
  //   redirect: "/login",
  // },
  {
    path: "/",
    name: "Home",
    component: () => import("../views/Home.vue"),
  },
  {
    path: "/login",
    name: "login",
    component: () => import("../views/Login.vue"),
  },
  {
    path: "/register",
    name: "register",
    component: () => import("../views/Register.vue"),
  },
  {
    path: "/personal",
    name: "personal",
    component: () => import("../views/personal/index.vue"),
  },
  {
    path: "/setting",
    name: "setting",
    meta: {
      code: true,
    },
    component: () => import("../views/personal/setting.vue"),
  },
  {
    path: "/eait",
    name: "eait",
    meta: {
      code: true,
    },
    component: () => import("../views/personal/eait.vue"),
  },
  {
    path: "/watchful",
    component: () => import("../views/personal/watchful.vue"),
    name: "watchful",
    meta: {
      code: true,
    },
  },
  {
    path: "/collect",
    component: () => import("../views/personal/collect.vue"),
    name: "collect",
    meta: {
      code: true,
    },
  },
  {
    path: "/follow",
    component: () => import("../views/personal/follow.vue"),
    name: "follow",
    meta: {
      code: true,
    },
  },
  {
    path: "/attention",
    component: () => import("../views/personal/attention.vue"),
    name: "attention",
    meta: {
      code: true,
    },
  },
  {
    path: "/renaissance/:id/:comment_length",
    component: () => import("../components/renaissance .vue"),
    name: "renaissance",
  },
  {
    path: "/search",
    component: () => import("../components/search.vue"),
    name: "search",
  },
  {
    path: "/management",
    component: () => import("../views/personal/management .vue"),
    name: "management",
  },
];

const router = new VueRouter({
  routes,
  mode: "history",
});

export default router;
